package com.itheima.test;

import java.util.Scanner;

/*
字符串的遍历,用chaer接收后用charAt遍历
 */
public class Demo1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入字符串");
        String s = sc.nextLine();
        for(int i= 0;i<s.length();i++){
            char c = s.charAt(i);
            System.out.println(c);
        }
    }
}
